exports.chatRoomMembers = function (req, res) {

    //获取参数信息
    var bodyParams = req.routeInfo.bodyParams;

    //返回结果
    var resultData = {};

    //临时存储获取信息
    var datas = {};

    //任务流创建
    async.waterfall([

        //检查是否存在这个聊天室 并返回此聊天室的基本信息
        //查询全局变量里面的聊天室的基本信息
        (cb) => {
            db.where({
                "cr_room_id" : bodyParams.chatroomId
            }).select("socket_chat_room",(rs)=>{

                if(rs.length == 0){
                    return RES.errorResponse(res,"此聊天室不存在");
                }
                datas = rs[0]
                cb()
            })
        },
        (cb) => {
            var key = 'R_' + datas.cr_id
            var preloadingresultData  = {}
            preloadingresultData.data = []
            var i = 0;

            for (var p1 in chatRoom[key].member) {

                preloadingresultData.data[i] = {}
                preloadingresultData.data[i] = chatRoom[key].member[p1]
                var userIds = p1.substr(3,p1.length-3)
                preloadingresultData.data[i].userId = userIds

                i++;
            }
            var count        = bodyParams.count ? bodyParams.count : 'ALL'
            var timeSequence = bodyParams.timeSequence ? bodyParams.timeSequence : 0
            var newDatas = common.sortCount(preloadingresultData.data,count,timeSequence)
            resultData = newDatas

            cb()
        },

    ],()=> {

        //返回最终拼接结果
        RES.successResponse(res,resultData);

    });
    
}